<?php        
	//check whether the balance for admin has reached the maximum amount set up by the admin
	$admin_sql = "SELECT pay_amount FROM  admin_pay  WHERE pay_id = 1";
    $admin_ret = mysql_query($admin_sql);
	if($admin_row = mysql_fetch_object($admin_ret)) $admin_balance = $admin_row->pay_amount;

	//if maximum limit (from constants.php) is reached
	if($admin_balance>$admin_maximum_amount)
	{
		/*get message from file
		$filename			= "../admin/admin_maximum_balance_msg.htm";
		$fp 				= fopen($filename,'r');
		$admin_message 		= fread ($fp, filesize ($filename));
		fclose($fp);	*/
?>
   <table cellpadding="0" cellspacing="0" width="100%" align="center">
   <tr>
      <td width="100%"  colspan="3" align="center" height="30" class="textred">Your account balance has reached the maximum balance amount limit.</td>
  </tr>
  </table>
<?php
	}

$merchantname	=trim(stripslashes($_POST['merchant']));
$searchbut		=trim($_POST['search'])  ;
if(empty($merchantname))  	$merchantname	  = trim(stripslashes($_GET['merchant']));
if($searchbut=="Search")    $_SESSION['SESSIONSTATUS']="all";

echo    "<br/>";
echo    "<form name=\"searchmerchantform\" method=\"post\" action=\"index.php?Act=merchants\"> ";
echo    "<table width=\"50%\" class=\"tablebdr\" align=\"center\">\n ";
echo    "<tr>";
echo    "<td class =\"tdhead\" height=\"25\" align=\"center\" colspan=\"3\">Search Merchant</td>\n";
echo    "</tr>";
echo    "<tr>";
echo    "<td  height=\"25\" align=\"center\" colspan=\"3\"></td>\n";
echo    "</tr>";
echo    "<tr>";
echo    "<td  height=\"25\" align=\"center\">Merchant</td>\n";
echo    "<td  height=\"25\" align=\"center\"><input type=\"text\" name=\"merchant\" value=\"$merchant\" /></td>\n";
echo    "<td  height=\"25\" align=\"center\"><input type=\"submit\" name=\"search\" value=\"Search\" /></td>\n";
echo    "</tr>";
echo    "<tr>";
echo    "<td  height=\"25\" align=\"center\" colspan=\"3\"></td>\n";
echo    "</tr>";
echo    "</table>";
echo    "</form>";

?>